#include"math.h"
#include<cmath>
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
{
	return std::sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2));
}
double distance(Point pt1, Point pt2)
{
	return distance(pt1.x(), pt1.y(), pt1.z(), pt2.x(), pt2.y(), pt2.z());
}

Array& Array::operator+(Array& array)
{
	m_x += array.m_x;
	m_y += array.m_y;
	return *this;
}
Array& Array::operator-(Array& array)
{
	m_x -= array.m_x;
	m_y -= array.m_y;
	return *this;
}


Array& Array::operator*(double& num)
{
	m_x *= num;
	m_y *= num;
	return *this;
}



double Array::operator*(Array& array)
{
	return m_x * array.m_x + m_y * array.m_y;
}

Array& Array::operator/(double& num)
{
	m_x /= num;
	m_y /= num;
	return *this;
}
